package com.hdax.dm.api.order.controller;

import com.hdax.dm.api.order.OrderControllerApi;
import com.hdax.dm.entity.order.Order;
import com.hdax.dm.entity.order.OrderLinkUser;
import com.hdax.dm.entity.user.User;
import com.hdax.dm.service.OrderPService;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.sql.Date;
import java.time.LocalDateTime;
import java.util.List;

@Component
public class OrderPController implements OrderControllerApi {

    @Autowired
    private OrderPService orderPService;

    @Override
    public boolean addOrder(Order order) {
        return orderPService.addOrder(order);
    }

    @Override
    public Order FindByOrderId(String orderNo) {
        return orderPService.FindByOrderId(orderNo);
    }

    @Override
    public boolean addOrderLink(OrderLinkUser orderLinkUser) {
        return orderPService.addOrderLink(orderLinkUser);
    }

    @Override
    public Integer deleteOrderByNo(String orderNo) {
        return orderPService.deleteOrderByNo(orderNo);
    }

    @Override
    public Integer updateOrderType(String orderNo, Integer type) {
        return orderPService.updateOrderType(orderNo, type);
    }

    @Override
    public List<Order> queryorderlist(String keyword, Object orderTime, Object orderType, Long userId) {
        return orderPService.queryorderlist(keyword, orderTime, orderType,userId);
    }

    @Override
    public boolean deleteticketbuyer(Long linkId) {
        return orderPService.deleteticketbuyer(linkId);
    }

    @Override
    public User querypersoninfo(Long userId) {
        return orderPService.querypersoninfo(userId);
    }

    @Override
    public boolean modifypersoninfo(User user) {
        return orderPService.modifypersoninfo(user);
    }

    @Override
    public boolean modifypersoninfo1(Long id ,String imgUrl) {
        return orderPService.modifypersoninfo1(id,imgUrl);
    }

}
